class Solution:
    def search(self, nums: list[int], target: int) -> int:
        out = -1
        count = 0
        for i in nums:
            if i == target:
                return count
            count += 1
        return -1


a = Solution()
p = a.search([1, 2, 3, 4, 5, 6, 7], 5)
print(p)
